#ifndef ROBOTMC_H
#define ROBOTMC_H
#include <string>
#include "robotCommon.h"

#ifdef __cplusplus 
extern "C"
{
#endif


GENESDK_API HRESULT MC_SetWobj(void* handle, const WobjData* data, int mg = 0);
GENESDK_API HRESULT MC_SetZone(void* handle, const ZoneData* data, int mg = 0);
GENESDK_API HRESULT MC_SetTool(void* handle, const ToolData* data, int mg = 0);
GENESDK_API HRESULT MC_SetLoad(void* handle, const LoadData* data, int mg = 0);
GENESDK_API HRESULT MC_SetSpeed(void* handle, const SpeedData* data, int mg = 0);

GENESDK_API HRESULT MC_MoveL(void* handle, const HelperRobTarget* target, const SpeedData* speed, int mg = 0, int wait = 0);
GENESDK_API HRESULT MC_MoveJ(void* handle, const HelperRobTarget* target, const SpeedData* speed, int mg = 0, int wait = 0);
GENESDK_API HRESULT MC_MoveC(void* handle, const HelperRobTarget* via_target, const HelperRobTarget* target, const SpeedData* speed, int mg = 0, int wait = 0);
GENESDK_API HRESULT MC_MoveAbsJ(void* handle, const HelperRobJointTarget* data, const SpeedData* speed, int mg = 0, int wait = 0);
GENESDK_API HRESULT MC_Init(void* handle);
GENESDK_API HRESULT MC_Start(void* handle);
GENESDK_API HRESULT MC_Stop(void* handle);
GENESDK_API HRESULT MC_WaitEndOfMotion(void* handle, int timeout, int mg=0);
GENESDK_API HRESULT MC_ConfJ(void* handle, bool on);
GENESDK_API HRESULT MC_ConfL(void* handle, bool on);
GENESDK_API HRESULT MC_Sleep(void* handle, int timeMs);
GENESDK_API HRESULT MC_GetReachedPoint(void* handle, int mg, int* pointIndex);
GENESDK_API HRESULT MC_SetAcc(void* handle, bool max_acc_defined, float max_acc, float dacc, float ddec);
GENESDK_API HRESULT MC_Reset(void* handle);

GENESDK_API HRESULT RS485_Open(void* handle, const char* ttyName, int buadRate, int data_bits, const char* parity, int stop_bits);
GENESDK_API HRESULT RS485_Close(void* handle, const char* ttyName);
GENESDK_API HRESULT RS485_Flush(void* handle, const char* ttyName);
GENESDK_API HRESULT RS485_Send(void* handle, const char* ttyName, char* data_buf, int data_len);
GENESDK_API HRESULT RS485_Recv(void* handle, const char* ttyName, char* recv_buf, int buf_len, int* recv_len);


#ifdef __cplusplus
}
#endif
#endif // !ROBOTMOTION#pragma once
